package com.tanhua.server.controller;

import com.tanhua.server.service.HuanXinUserService;
import com.tanhua.server.vo.HuanXinUserVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("huanxin")
public class HuanXinUserController {

    @Autowired
    private HuanXinUserService huanXinUserService;

    /**
     * 通过登录用户的ID查找在环信中注册的用户信息
     *
     * @return
     */
    @GetMapping("user")
    public HuanXinUserVo findHuanXinUser() {
        return huanXinUserService.findHuanXinUser();
    }
}
